﻿using Phone.Interface;
using GooglePhone;
using ApplePhone;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Factory
{
    public class ObjectFactory
    {
        public static BasePhone CreatePhone(int  type)
        {
            if (type == 1)
            {
                return new iPhone();
            } else if (type == 2)
            {
                return new Galaxy();
            }
            else
                throw new Exception();
        }
    }
}
